package com.itheima.mapper;

import com.itheima.domain.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentMapper {

    public abstract Student selectById(Integer id);

    public abstract int save (Student student);

   /*
   这里的返回值类型会影响后面的方法选择
                                        ---如果返回值是Student类型,则底层只调用selectOne只能查出一个
                                        ---如果返回值是List类型则会调用selectAll查多个
   */
    public abstract List<Student> selectByIdOrNameOrAgeOrGneder(@Param("p1") int id,@Param("p2") String name, @Param("p3") int age,@Param("p4") String gender);


}
